/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CompraOnline.java
 *
 * Created on 21/05/2011, 03:40:33 PM
 */

package GUI;

import Interfaz.InterfazControl;
import Motor.Cliente;
import javax.swing.ImageIcon;

/**
 *
 * @author Vane
 */
public class CompraOnline extends javax.swing.JFrame {
private InterfazControl laInterfaz;
private Cliente cliente;
    /** Creates new form CompraOnline */
    public CompraOnline(InterfazControl laInterfaz,Cliente cliente) {
		this.cliente=cliente;
		this.laInterfaz=laInterfaz;
        initComponents();
		this.setLocationRelativeTo(null); // Cambiar icono de java en ventana
        this.setIconImage(new ImageIcon("src/imagenes/marketplus2.png").getImage());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel2 = new javax.swing.JLabel();
        jCAccesoriodeHogar = new javax.swing.JComboBox();
        jBCharcuteria = new javax.swing.JComboBox();
        jCCuidadoPersonal = new javax.swing.JComboBox();
        jCViveres = new javax.swing.JComboBox();
        jCCestaBasica = new javax.swing.JComboBox();
        jCFarmacia = new javax.swing.JComboBox();
        jSpinner1 = new javax.swing.JSpinner();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel5 = new javax.swing.JLabel();
        jTTotal = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jToggleProcesarOnline1 = new javax.swing.JToggleButton();
        jLabel8 = new javax.swing.JLabel();
        jBIrPrincipal = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(620, 460));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel2.setFont(new java.awt.Font("Tempus Sans ITC", 3, 14));
        jLabel2.setText("Pasillos");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(10, 100, 90, 14);

        jCAccesoriodeHogar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Accesorio Hogar", "BRISOL LAVAPLATOS LIQ. 800 CC.", "RAID GOLD 360CC", "CLARA ESPONJITA MULTIUSO 1 UND" }));
        getContentPane().add(jCAccesoriodeHogar);
        jCAccesoriodeHogar.setBounds(10, 270, 210, 20);

        jBCharcuteria.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Charcutería", "Pechuga de Pavo Charvenca", "Pechuga de Pavo Movilla", "Jamón Cocido Banquete" }));
        jBCharcuteria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCharcuteriaActionPerformed(evt);
            }
        });
        getContentPane().add(jBCharcuteria);
        jBCharcuteria.setBounds(10, 120, 210, 20);

        jCCuidadoPersonal.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cuidado Personal", "COLGATE CREMA DENTAL TOTAL 150ML", "GILLETTE MACH3 TURBO VICTORY MAQUINA", "PONDS TOALLAS DESMAQUILLANTES" }));
        getContentPane().add(jCCuidadoPersonal);
        jCCuidadoPersonal.setBounds(10, 150, 210, 20);

        jCViveres.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Víveres", "CANPROLAC FORMULACIÓN EN LATA 900 GRS", "HEINZ TOMATTINA SALSA 470 GR.", "KELLOGGS SPECIAL K. 310 GR." }));
        getContentPane().add(jCViveres);
        jCViveres.setBounds(10, 180, 210, 20);

        jCCestaBasica.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cesta Básica", "MONTALBAN AZÚCAR REFINADA 2KG.", "EDUARDO CINTA N. 3 CON ESP. 250G.", "P. A. N. HARINA MAIZ BLANCO 1 KG.", "MARY ARROZ PREMIUM 99% G. E. 1KG." }));
        getContentPane().add(jCCestaBasica);
        jCCestaBasica.setBounds(10, 210, 210, 20);

        jCFarmacia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Farmacia", "LAMISIL UNO SFP X 4 GR", "LAMISIL UNO SFP X 4 GR", "CALCIBON D TAB 1500MG ULTRAD X 30" }));
        getContentPane().add(jCFarmacia);
        jCFarmacia.setBounds(10, 240, 210, 20);
        getContentPane().add(jSpinner1);
        jSpinner1.setBounds(270, 160, 29, 20);

        jLabel3.setText("Cant");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(310, 160, 40, 14);

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                " Producto", "Monto"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Float.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(400, 110, 190, 190);

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel5.setText("Lista de Productos");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(450, 90, 110, 14);

        jTTotal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTTotalActionPerformed(evt);
            }
        });
        getContentPane().add(jTTotal);
        jTTotal.setBounds(500, 300, 90, 30);

        jLabel6.setText("Total BsF + IVA:");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(400, 300, 110, 30);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/marketplus.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 0, 110, 80);

        jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 18));
        jLabel4.setText("Supermercados");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(210, 10, 150, 30);

        jLabel7.setFont(new java.awt.Font("Tempus Sans ITC", 3, 18));
        jLabel7.setText(" Market Plus");
        getContentPane().add(jLabel7);
        jLabel7.setBounds(220, 40, 120, 30);

        jToggleProcesarOnline1.setText("Procesar Compra");
        jToggleProcesarOnline1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleProcesarOnline1ActionPerformed(evt);
            }
        });
        getContentPane().add(jToggleProcesarOnline1);
        jToggleProcesarOnline1.setBounds(140, 350, 160, 30);

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel8.setText("RIF: J-122231245          Desarrollado por: Group Delivery");
        getContentPane().add(jLabel8);
        jLabel8.setBounds(170, 390, 320, 20);

        jBIrPrincipal.setText("Ir a Página Principal");
        jBIrPrincipal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBIrPrincipalActionPerformed(evt);
            }
        });
        getContentPane().add(jBIrPrincipal);
        jBIrPrincipal.setBounds(320, 350, 150, 30);

        pack();
    }// </editor-fold>//GEN-END:initComponents

	private void jTTotalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTTotalActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jTTotalActionPerformed

	private void jBCharcuteriaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCharcuteriaActionPerformed
		// TODO add your handling code here:
	}//GEN-LAST:event_jBCharcuteriaActionPerformed

	private void jToggleProcesarOnline1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleProcesarOnline1ActionPerformed
		// TODO add your handling code here:
		PagoOnline irPagoOnline=new PagoOnline(laInterfaz);
		irPagoOnline.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jToggleProcesarOnline1ActionPerformed

	private void jBIrPrincipalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBIrPrincipalActionPerformed
		// TODO add your handling code here:
		Principal irPrincipal = new Principal(laInterfaz);
		irPrincipal.setVisible(true);
		this.dispose();
	}//GEN-LAST:event_jBIrPrincipalActionPerformed

    /**
    * @param args the command line arguments
    */
   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox jBCharcuteria;
    private javax.swing.JButton jBIrPrincipal;
    private javax.swing.JComboBox jCAccesoriodeHogar;
    private javax.swing.JComboBox jCCestaBasica;
    private javax.swing.JComboBox jCCuidadoPersonal;
    private javax.swing.JComboBox jCFarmacia;
    private javax.swing.JComboBox jCViveres;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSpinner jSpinner1;
    private javax.swing.JTextField jTTotal;
    private javax.swing.JTable jTable1;
    private javax.swing.JToggleButton jToggleProcesarOnline1;
    // End of variables declaration//GEN-END:variables

}
